home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 5.5 KB | 195 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPrtIte.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- //
- // This file contains the iterators on a part defined by ODF .
- //
- // - FW_CPartFrameIterator
- // Iterates through all the display frames of your part for a specific
- // presentation. If kNoPresentation is used, all the display frames are returned.
- //
- // - FW_CPartFacetIterator
- // Iterates through all the facets of your part for a specific
- // presentation. If kNoPresentation is used, all the facets are returned.
- //
- // - FW_CPartEmbeddedFrameIterator
- // This an iterator requiered by OpenDoc. It iterates through all the embedded frames
- // of the specified display frames.
- //
-
- #ifndef FWPRTITE_H
- #define FWPRTITE_H
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWEXCLIB_H
- #include "FWExcLib.h"
- #endif
-
- #ifndef FWPARTNG_H
- #include "FWPartng.h"
- #endif
-
- #ifndef FWPRESEN_H
- #include "FWPresen.h"
- #endif
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- #ifndef FWPART_H
- #include "FWPart.h"
- #endif
-
- // ----- ODUtil -----
-
- #ifndef FWORDCOL_H
- #include "FWOrdCol.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CPart;
- class FW_CFrame;
- class FW_CEmbeddingFrame;
- class ODFrame;
- class FW_CPartFrameIterator;
- class FW_CPresentationFrameIterator;
- class FW_CPartPresentationIterator;
- class FW_CProxyFrame;
- class FW_CEmbeddingPart;
- class FW_CProxyEmbeddedFrameIterator;
- class FW_CProxyProxyFrameIterator;
-
- //========================================================================================
- // class FW_CPartPresentationIterator
- //========================================================================================
-
- class FW_CPartPresentationIterator : public FW_TOrderedCollectionIterator<FW_CPresentation>
- {
- public:
- FW_DECLARE_AUTO(FW_CPartPresentationIterator)
-
- FW_CPartPresentationIterator(const FW_CPart* part);
- ~FW_CPartPresentationIterator();
- };
-
- //========================================================================================
- // class FW_CPartFrameIterator
- //========================================================================================
-
- class FW_CPartFrameIterator
- {
- public:
- FW_DECLARE_AUTO(FW_CPartFrameIterator)
-
- FW_CPartFrameIterator(Environment* ev, const FW_CPart* part);
- ~FW_CPartFrameIterator();
-
- FW_CFrame* First(Environment* ev);
- FW_CFrame* Next(Environment* ev);
- FW_CFrame* Last(Environment* ev);
- FW_CFrame* Previous(Environment* ev);
- FW_Boolean IsNotComplete(Environment*)
- {return fCurrentFrame != NULL;}
-
- protected:
- FW_CFrame* PrivFirstFrame(Environment* ev, FW_CPresentation* presentation);
- FW_CFrame* PrivLastFrame(Environment* ev, FW_CPresentation* presentation);
-
- private:
- FW_CFrame* fCurrentFrame;
- FW_CPartPresentationIterator fPresentationIterator;
- FW_CPresentationFrameIterator* fFrameIterator;
- };
-
- //========================================================================================
- // class FW_CPartProxyIterator
- //========================================================================================
-
- class FW_CPartProxyIterator : public FW_TOrderedCollectionIterator<FW_MProxy>
- {
- public:
- FW_DECLARE_AUTO(FW_CPartProxyIterator)
-
- FW_CPartProxyIterator(const FW_CEmbeddingPart* part);
- ~FW_CPartProxyIterator();
- };
-
- //========================================================================================
- // class FW_CPartProxyFrameIterator
- //========================================================================================
-
- class FW_CPartProxyFrameIterator
- {
- public:
- FW_DECLARE_AUTO(FW_CPartProxyFrameIterator)
-
- FW_CPartProxyFrameIterator(const FW_CEmbeddingPart* part);
- ~FW_CPartProxyFrameIterator();
-
- FW_CProxyFrame* First();
- FW_CProxyFrame* Next();
- FW_CProxyFrame* Last();
- FW_CProxyFrame* Previous();
- FW_Boolean IsNotComplete()
- {return fCurrentFrame != NULL;}
-
- protected:
- FW_CProxyFrame* PrivFirstFrame(FW_MProxy* proxy);
- FW_CProxyFrame* PrivLastFrame(FW_MProxy* proxy);
-
- private:
- FW_CProxyFrame* fCurrentFrame;
- FW_CPartProxyIterator fProxyIterator;
- FW_CProxyProxyFrameIterator* fProxyFrameIterator;
- };
-
- //========================================================================================
- // class FW_CPartEmbeddedFrameIterator
- //========================================================================================
-
- class FW_CPartEmbeddedFrameIterator
- {
- public:
- FW_DECLARE_AUTO(FW_CPartEmbeddedFrameIterator)
-
- FW_CPartEmbeddedFrameIterator(Environment* ev, const FW_CEmbeddingPart* part, FW_CEmbeddingFrame* frame = NULL);
- ~FW_CPartEmbeddedFrameIterator();
-
- ODFrame* First(Environment* ev);
- ODFrame* Next(Environment* ev);
- ODFrame* Last(Environment* ev);
- ODFrame* Previous(Environment* ev);
- FW_Boolean IsNotComplete(Environment*)
- {return fCurrentFrame != NULL;}
-
- protected:
- ODFrame* PrivFirstFrame(Environment* ev, FW_MProxy* proxy);
- ODFrame* PrivLastFrame(Environment* ev, FW_MProxy* proxy);
-
- private:
- ODFrame* fCurrentFrame;
- FW_CPartProxyIterator fProxyIterator;
- FW_CProxyEmbeddedFrameIterator* fEmbeddedFrameIterator;
- FW_CEmbeddingFrame* fEmbeddingFrame;
- };
-
-
- #endif